/* $RCSFile: LicenseKey.cs $
 * Apache license v2 2011 by Christian Surieux
 * $Source: ?/ADNCRM.ServerControls/LicenseKey.cs $
 * $log$
 * Revision 6 2010/08/06 19:56:30  christian.surieux
 *   Added Log to All cs files
 */

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace ADNCRM.ServerControls
{
    /// <summary>
    /// Summary description for License
    /// </summary>
    public class LicenseKey : ConfigurationElement
    {
        [ConfigurationProperty("Product", IsRequired = true, IsKey=true)]
        public string Product
        {
            get
            {
                return this["Product"] as string;
            }
            set
            {
                this["Product"] = value;
            }
        }


        [ConfigurationProperty("LicensePIN", IsRequired = true)]
        public string LicensePIN
        {
            get
            {
                return this["LicensePIN"] as string;
            }
            set
            {
                this["LicensePIN"] = value;
            }
        }

        public LicenseKey()
        {}

        public LicenseKey(string productName)
        {
            Product =   productName;
        }

        public LicenseKey(string productName,string licenceKey)
        {
            Product     =   productName;
            LicensePIN  =   licenceKey;
        }
    }
}